﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace TSVNAddin.Core
{
	public class FileSystemAdapter : IFileStorage
	{
		public void Move(string sourcePath, string destPath)
		{
			for (int i = 0; i < 4; i++)
			{
				try
				{
					Directory.Move(sourcePath, destPath);
					break;
				}
				catch
				{
					System.Threading.Thread.Sleep(10);
					//log
				}
			}
		}

		public void DeleteDirectory(string path)
		{
			try
			{
				Directory.Delete(path, true);
			}
			catch (DirectoryNotFoundException)
			{
			}
		}
	}
}
